<section id="widget-grid" class="">
	<!-- row -->
	<div class="row">
		<!-- NEW WIDGET START -->
		<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-sortable="true" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false">
				<header>
					<span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2> 车辆管理 </h2>
				</header>
				<!-- widget div-->
				<div>
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
					</div>
					<!-- end widget edit box -->

					<!-- widget content -->
					<div class="widget-body no-padding">
						<!-- 自定义搜索区 -->
						<div class="widget-body-toolbar" style="height:70px;overflow:hidden;">
							<form role="form" class="smart-form">
								<div class="global-search-box">
									
									<section class="pull-left no-padding pull-width160 pull-padding-right50">
										<label class="">车牌号</label>
										<label class="input multiselect-bg">
											<input type="text" class="input-sm" style="width:100%"  name="tid" placeholder="aaa" value=""  id="e6">
											<div class="multiselect-box" id="moreResult">已选择20辆车<a href="javascript:void(0);" class="select2-search-choice-close" id="clearMoreRe"></a></div>
										</label>
										<label  style="position:absolute;right:0; bottom:0;"><a href="javascript:void(0);" class="btn btn-default btn-sm" onclick="selectMoreT();">多选</a></label>

									</section>
									
									<section class="pull-left no-padding pull-width200" >
										<label class="">所属机构</label>
										<label class="input">
											<input type="text" class="input-sm" style="width:100%"  name="tid" placeholder="快速查找" value=""  id="e5">
											<!-- <select id="e5" style="width:100%" class="input-sm select2"></select> -->
										</label>
									</section>
									<section class="pull-left no-padding pull-width80" >
										<label class="lael">车辆类型</label>
										<label class="input">
										<label class="select">
											<select class="input-sm">
												<option value="0">全部</option>
												<option value="1">合同车队</option>
												<option value="1">合同个体车</option>
												<option value="1">临时车辆</option>
											</select> <i></i> 
										</label>
									</section>
									<!-- <section class="pull-left no-padding pull-width80" >
										<label class="">车长</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section>
									<section class="pull-left no-padding pull-width80" >
										<label class="">箱型</label>
										<label class="select">
											<select class="input-sm">
												<option value="0">高栏</option>
												<option value="1">平板</option>
											</select> <i></i> 
										</label>
									</section>
									<section class="pull-left no-padding pull-width120" >
										<label class="">额定载重</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section> -->
									<!-- <section class="pull-left no-padding pull-width180" >
										<label class="">日期</label>
										<label class="input">
											<i class="icon-prepend fa fa-calendar"></i>
											<input name="in_date" class="input-sm" type="text" id="syxDate" value="2014-02-01" maxlength="10">
										</label>
										<script type="text/javascript">	
											$(document).ready(function() {
											  $('#syxDate').daterangepicker({ 
													singleDatePicker: true, //必须要有默input 认value
													timePicker: true,		//是否启用时间选择
													timePickerIncrement:10,	//分钟选择的间隔
													format: 'YYYY-MM-DD hh:mm',	//返回值的格式
													timePicker12Hour: false,	//采用24小时计时制
													showDropdowns: true,		//是否显示年、月下拉框
													maxDate:'2014-08-15',
													buttonClasses: ['btn'],
										            applyClass: 'blue',
										            cancelClass: 'default',
										            separator: ' to ',
										            showButtonPanel: true
										            //endDate:'2014-08-15'
													});
										   });
										</script>
									</section> -->
									<!-- <section class="pull-left no-padding pull-width200" >
										<label class="">合同到期日</label>
										<label class="input">
											<i class="icon-prepend fa fa-calendar"></i>
											<input name="in_date" class="input-sm" type="text" max-date="2014-07-10" id="reservationT" value="14-07-06 - 14-07-10" maxlength="10">
										</label>
										<script type="text/javascript">
											
												$(document).ready(function() {
													$('#reservationT').daterangepicker({
													singleDatePicker: false,
													timePicker: false, //是否启用时间选择
													timePickerIncrement: 1, //分钟选择的间隔
													format: 'YY-MM-DD', //返回值的格式
													timePicker12Hour: false, //采用24小时计时制
													maxDate:'2014-07-10',
													timePicker: true,
												});
											}); 
										</script>
									</section> -->
									
									<div class="global-search-btn" >
										<a class="btn btn-primary btn-sm" type="button"><i class="fa fa-search"></i> 查询</a>
										<a id="more_search" class="btn btn-sm btn-link" type="button">更多条件</a>
							  		</div>
								</div>
								
							</form>
						</div>
						<!-- 自定义搜索区结束 -->
						<div class="row margin-top-10 margin-bottom-10" style="margin:0">
							<div class="col-xs-12 col-sm-8">
								<div class="btn-group">
									<a href="#ane/demo_truck_new.html" class="btn btn-default">新增车辆</a>
									<a href="#ane/demo_truck_import.html" class="btn btn-default">导入车辆</a>
								</div>
								<div class="btn-group">
									<a href="ane/src/mapReview.html" target="_blank" class="btn btn-default">回放</a>
									<a href="" target="_blank" class="btn btn-default">跟踪</a>
								</div>
								<div class="btn-group">
									<a href="javascript:dateExport();" class="btn btn-default">导出</a>
									<a href="#" class="btn btn-default">删除</a>
								</div>
							</div>
							<div class="hidden-xs col-sm-4 text-right">
                            	<div class="btn-group">
                                    <a type="button" class="btn btn-default " href="ane/src/mapView5.html" target="_blank"><i class="fa fa-globe"></i> 车辆监控</a>
									<!-- <a type="button" class="btn btn-default " href="#">
                                        <i class="fa fa-bar-chart-o"></i>
                                        相关报表
                                    </a> -->
                                </div>
							</div>
							<div class="visible-xs col-xs-12 margin-top-5">
                            	<div class="btn-group">
                                    <a type="button" class="btn btn-default " href="#"><i class="fa fa-globe"></i> 车辆监控</a>
									<a type="button" class="btn btn-default " href="#">
                                        <i class="fa fa-bar-chart-o"></i>
                                        相关报表
                                    </a>
                                </div>
							</div>
						</div>
						<table id="dt_basic" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th >
										<label class="no-margin"><input type="checkbox" class="checkbox style-0 checkAll"><span> </span></label>
									</th>
									<th>操作</th>
									<th>状态</th>
									<th>车牌号</th>
									<th>供应商姓名</th>
									<th>联系方式</th>
									<th>银行卡号</th>
									<th>车长</th>
									<th>箱型</th>
									<th>GPS状态</th>
									<th>所属车队</th>
									<th>车身颜色</th> 	 	 	
									<th>额定载重</th>
									<th>额定体积</th>
									<th>主驾司机</th>
									<th>手机号</th>
									<th>合同签订日</th>
									<th>合同到期日</th>
									<th>行驶证</th>
									<th>运输许可证</th>
									<th>保险卡</th>
								</tr>
							</thead>
							<tbody>
                            	<tr>
									<td>
										<label class="no-margin">
											<input type="checkbox" class="checkbox style-0">
											<span> </span>
										</label>
									</td>
									<td>
                                        <div class="btn-group">
                                            <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                             	<i class="fa fa-pencil"></i>
                                                <i class="fa fa-caret-down"></i>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <a href="javascript:void(0);">编辑</a>
                                                </li>
												<li>
                                                    <a href="javascript:void(0);">跟踪</a>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);">回放</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li>
                                                    <a href="javascript:void(0);">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
									<td>
                                    	<div class="text-center">
                                            <a href="javascript:void(0);" rel="popover-hover" data-placement="right" data-content="<div><i class='fa fa-angle-right'></i> 摄像头</div><div><i class='fa fa-angle-right'></i> 温控探头（1,2）</div><div><i class='fa fa-angle-right'></i> can总线连接</div>"  data-html="true"><h5 class="no-margin"><i title="在线" class="fa fa-circle txt-color-green"></i></h5></a> 
                                        </div>
                                    </td>
									<td><a href="javascript:void(0)">京H65432</a></td>
									<td>大宇车队</td>
									<td>13011333999</td>
									<td>621213459876021</td>
									<td>17.5</td>
									<td>平板</td>
									<td><a href="">5Km/h</a></td>
									<td>合同车队</td>
									<td>红色</td>
									<td>50</td>
									<td>40</td>
									<td><a href="">张凯悦</a></td>
									<td>13910015690</td>
									<td>2013-10-12</td>
									<td><span class="label label-warning font-xs">2014-10-12</span></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
								</tr>
								<tr>
									<td>
										<label class="no-margin">
											<input type="checkbox" class="checkbox style-0">
											<span> </span>
										</label>
									</td>
									<td>
                                        <div class="btn-group">
                                            <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                             	<i class="fa fa-pencil"></i>
                                                <i class="fa fa-caret-down"></i>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <a href="javascript:void(0);">编辑</a>
                                                </li>
												<li>
                                                    <a href="javascript:void(0);">跟踪</a>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);">回放</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li>
                                                    <a href="javascript:void(0);">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
									<td>
                                    	<div class="text-center">
                                            <a href="javascript:void(0);" rel="popover-hover" data-placement="right" data-content="<div><i class='fa fa-angle-right'></i> 摄像头</div><div><i class='fa fa-angle-right'></i> 温控探头（1,2）</div><div><i class='fa fa-angle-right'></i> can总线连接</div>"  data-html="true"><h5 class="no-margin"><i title="在线" class="fa fa-circle txt-color-green"></i></h5></a> 
                                        </div>
                                    </td>
									<td><a href="javascript:void(0)">浙H29946</a></td>
									<td>大宇车队</td>
									<td>13011923498</td>
									<td>621213459876021</td>
									<td>17.5</td>
									<td>平板</td>
									<td><a href="">15Km/h</a></td>
									<td>合同车队</td>
									<td>红色</td>
									<td>50</td>
									<td>40</td>
									<td><a href="">张凯悦</a></td>
									<td>13910015690</td>
									<td>2013-10-12</td>
									<td>2014-12-12</td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
								</tr>
								<tr>
									<td>
										<label class="no-margin">
											<input type="checkbox" class="checkbox style-0">
											<span> </span>
										</label>
									</td>
									<td>
                                        <div class="btn-group">
                                            <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                             	<i class="fa fa-pencil"></i>
                                                <i class="fa fa-caret-down"></i>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <a href="javascript:void(0);">编辑</a>
                                                </li>
												<li>
                                                    <a href="javascript:void(0);">跟踪</a>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);">回放</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li>
                                                    <a href="javascript:void(0);">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
									<td>
                                    	<div class="text-center">
                                            <a href="javascript:void(0);" rel="popover-hover" data-placement="right" data-content="<div><i class='fa fa-angle-right'></i> 摄像头</div><div><i class='fa fa-angle-right'></i> 温控探头（1,2）</div><div><i class='fa fa-angle-right'></i> can总线连接</div>"  data-html="true"><h5 class="no-margin"><i title="在线" class="fa fa-circle txt-color-green"></i></h5></a> 
                                        </div>
                                    </td>
									<td><a href="javascript:void(0)">浙H90248</a></td>
									<td>大宇车队</td>
									<td>13912347869</td>
									<td>621213459876021</td>
									<td>17.5</td>
									<td>平板</td>
									<td><a href="">离线/ACC关</a></td>
									<td>合同车队</td>
									<td>红色</td>
									<td>50</td>
									<td>40</td>
									<td><a href="">刘欢</a></td>
									<td>13910015690</td>
									<td>2013-10-12</td>
									<td><span class="label label-danger font-xs">2014-09-12</span></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
								</tr>
								<tr>
									<td>
										<label class="no-margin">
											<input type="checkbox" class="checkbox style-0">
											<span> </span>
										</label>
									</td>
									<td>
                                        <div class="btn-group">
                                            <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                             	<i class="fa fa-pencil"></i>
                                                <i class="fa fa-caret-down"></i>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <a href="javascript:void(0);">编辑</a>
                                                </li>
												<li>
                                                    <a href="javascript:void(0);">跟踪</a>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);">回放</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li>
                                                    <a href="javascript:void(0);">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
									<td>
                                    	<div class="text-center">
                                            <a href="javascript:void(0);" rel="popover-hover" data-placement="right" data-content="<div><i class='fa fa-angle-right'></i> 摄像头</div><div><i class='fa fa-angle-right'></i> 温控探头（1,2）</div><div><i class='fa fa-angle-right'></i> can总线连接</div>"  data-html="true"><h5 class="no-margin"><i title="在线" class="fa fa-circle txt-color-green"></i></h5></a> 
                                        </div>
                                    </td>
									<td><a href="javascript:void(0)">京H65432</a></td>
									<td>大宇车队</td>
									<td>13011333999</td>
									<td>621213459876021</td>
									<td>17.5</td>
									<td>平板</td>
									<td><a href="">静止</a></td>
									<td>合同车队</td>
									<td>红色</td>
									<td>50</td>
									<td>40</td>
									<td><a href="">李开元</a></td>
									<td>13910015690</td>
									<td>2013-10-12</td>
									<td><span class="label label-warning font-xs">2014-10-12</span></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
								</tr>
								<tr>
									<td>
										<label class="no-margin">
											<input type="checkbox" class="checkbox style-0">
											<span> </span>
										</label>
									</td>
									<td>
                                        <div class="btn-group">
                                            <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                             	<i class="fa fa-pencil"></i>
                                                <i class="fa fa-caret-down"></i>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <a href="javascript:void(0);">编辑</a>
                                                </li>
												<li>
                                                    <a href="javascript:void(0);">跟踪</a>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);">回放</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li>
                                                    <a href="javascript:void(0);">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
									<td>
                                    	<div class="text-center">
                                            <a href="javascript:void(0);" rel="popover-hover" data-placement="right" data-content="<div><i class='fa fa-angle-right'></i> 摄像头</div><div><i class='fa fa-angle-right'></i> 温控探头（1,2）</div><div><i class='fa fa-angle-right'></i> can总线连接</div>"  data-html="true"><h5 class="no-margin"><i title="在线" class="fa fa-circle txt-color-green"></i></h5></a> 
                                        </div>
                                    </td>
									<td><a href="javascript:void(0)">沪Y89294</a></td>
									<td>大宇车队</td>
									<td>13892194963</td>
									<td>621213459876021</td>
									<td>17.5</td>
									<td>平板</td>
									<td><a href="">22Km/h</a></td>
									<td>合同车队</td>
									<td>红色</td>
									<td>50</td>
									<td>40</td>
									<td><a href="">华少伟</a></td>
									<td>13910015690</td>
									<td>2013-10-12</td>
									<td><span class="label label-warning font-xs">2014-10-12</span></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
									<td><a href="">235425432</a></td>
								</tr>
							</tbody>
						</table>
					</div>
					<!-- end widget content -->
				</div>
				<!-- end widget div -->
			</div>
			<!-- end widget -->

		</article>
		<!-- WIDGET END -->
	</div>
	<!-- end row -->
</section>

<!-- Modal导出 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">导出车辆数据</h4>
			</div>
			<div class="modal-body">
				<form class="smart-form" action="">
					<fieldset class="no-padding">
						<div class="col-xs-12 no-padding">
							<div class="row margin-top-5">
								<div class="col col-10">
									<label class="label">数据包1（1-10000）</label>
									<label class="select">
										<div class="progress progress-xs progress-striped active">
											<div class="progress-bar bg-color-blue" role="progressbar" style="width: 100%"></div>
										</div>
									</label>
								</div>
								<div class="col col-2">
									<button type="button" class="btn btn-sm btn-success btn-block margin-top-10">下载</button>
								</div>
							</div>
							<hr />
							<div class="row margin-top-5">
								<div class="col col-10">
									<label class="label">数据包2（10001-20000）</label>
									<label class="select">
										<div class="progress progress-xs progress-striped active">
											<div class="progress-bar bg-color-blue" role="progressbar" style="width: 45%"></div>
										</div>
									</label>
								</div>
								<div class="col col-2">
									<button type="button" class="btn btn-sm btn-success margin-top-10 btn-block disabled">下载</button>
								</div>
							</div>
						</div>
					</fieldset>
				</form>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary">
					打包下载
				</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">
					取消
				</button>
			</div>
		</div>
	</div>
</div><!-- /.modal -->
<!-- Modal LBS跟踪 -->
<div class="modal fade" id="viewLbs" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">跟踪回放</h4>
			</div>
			<div class="modal-body no-padding" style="position:relative;height:500px;">
				<div id="mapView" style="width:100%;height:100%;background:#ccc;"></div>
				<div style="position:absolute; top:5px; right:5px;">
					<form role="search" class="navbar-form no-margin pull-left pull-width240">
						<div class="input-group">
							<input type="text" id="viewDate" value="2014-02-01" class="form-control">
							<script type="text/javascript">	
									$(document).ready(function() {
									  $('#viewDate').daterangepicker({ 
											singleDatePicker: true, //必须要有默input 认value
											//timePicker: true,		//是否启用时间选择
											timePickerIncrement:10,	//分钟选择的间隔
											format: 'YYYY-MM-DD',	//返回值的格式
											//timePicker12Hour: false,	//采用24小时计时制
											showDropdowns: true,		//是否显示年、月下拉框
											});
								   });
								</script>
							<div class="input-group-btn">
								<button type="button" class="btn btn-sm btn-default btn-primary"> 回放 </button>
							</div>
						</div>
					</form>
					<!-- <div class="btn-group">
						<a href="#" class="btn btn-default btn-sm active"> <span class="glyphicon glyphicon-move"></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-globe"></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-road"></span></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-check"></span></a>
					</div> -->
					<div class="btn-group">
						<a href="#" class="btn btn-default btn-sm"> 路况 </a>
						<a href="#" class="btn btn-default btn-sm"> 卫星 </a>
					</div>

				</div>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal LBS跟踪 -->
<div class="modal fade" id="moreTrucks"  role="dialog" aria-labelledby="aaa" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="">车辆多选</h4>
			</div>
			<div class="modal-body">
				<form class="smart-form" action="">
					<fieldset class="no-padding">
					<!-- <section >
						<div class="row">
							<label class="col col-3 text-align-right">选择车辆：</label>
							<label class="col-xs-8">
								<div class="form-group">
									<select multiple style="width:100%" class="select2" id="trucks">
											<option value="11" selected>京H11111</option>
											<option value="22" selected>京H22222</option>
											<option value="23" selected>京H22223</option>
											<option value="24" selected>京H22224</option>
											<option value="25" selected>京H22225</option>
											<option value="26">京H22226</option>
											<option value="27">京H22227</option>
											<option value="28">京H22228</option>
											<option value="29">京H22229</option>
											<option value="12">京H22212</option>
											<option value="14">京H22214</option>
										
									</select>
								</div>
							</label>
						</div>
					</section> -->
					<section >
						<div class="row">
							<label class="col col-3 text-align-right txt-color-red">已选择车辆：</label>
							<label class="col-xs-8 textarea">
								<textarea rows="3" class="custom-scroll"></textarea> 
							</label>
						</div>
					</section>
					<section >
						<div class="row">
							<label class="col col-3 text-align-right">选择车辆：</label>
							<label class="col-xs-8 ">
								<input type="text" class="input-sm" style="width:100%"  name="moretrucks" placeholder="aaa" value=""  id="e7">
							</label>
						</div>
					</section>
					</fieldset>
				</form>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="sure">
					<i class="fa fa-save"></i>
					确认
				</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">
					取消
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- end widget grid -->
<!-- MAIN APP JS FILE -->

<script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;sensor=false" type="text/javascript"></script> 

<script src="js/plugin/date/moment.js"></script>
<script src="js/plugin/date/daterangepicker1.js"></script>

<script type="text/javascript">

	// DO NOT REMOVE : GLOBAL FUNCTIONS!
	pageSetUp();

	$(function(){
		$("#e5").select2({  //自动完成
		    placeholder: "快速查找",
			allowClear: true,
		    minimumInputLength: 1,
		    data:[{id:0,text:'大禹车队'},{id:1,text:'圣嘉物流'},{id:2,text:'石桥物流'},{id:3,text:'中南运输'},{id:4,text:'广丰物流'}]
		});
		$("#e6").select2({  //自动完成
		    placeholder: "aaaaa",
			allowClear: true,
		    minimumInputLength: 1,
		    data:[{id:0,text:'enhancement'},{id:1,text:'bug'},{id:2,text:'duplicate'},{id:3,text:'invalid'},{id:4,text:'wontfix'}]
		});
		$("#e7").select2({  //自动完成
		    placeholder: "aaaaa",
			allowClear: false,
		    minimumInputLength: 1,
		    data:[{id:0,text:'enhancement'},{id:1,text:'bug'},{id:2,text:'duplicate'},{id:3,text:'invalid'},{id:4,text:'wontfix'}]
		});
		
		$("#clearMoreRe").click(function(){
			$("#moreResult").hide();
		})
	})

	// 更多搜索条件按钮!
	$("#more_search").attr("state","close");			
	$("#more_search").click(function(){
		if ($("#more_search").attr("state") == "close"){
			$(".widget-body-toolbar").css("height","auto");	
			$("#more_search").text("收起条件");
			$("#more_search").attr("state","open");
		}
		else {
			$(".widget-body-toolbar").css("height","70");	
			$("#more_search").text("更多条件");
			$("#more_search").attr("state","close");			
			}
	});

	// load bootstrap-progress bar script
	loadScript("js/plugin/bootstrap-progressbar/bootstrap-progressbar.js", progressBarAnimate);

	// Fill all progress bars with animation
	function progressBarAnimate() {
		$('.progress-bar').progressbar({
			display_text : 'fill'
		});
	}

	// PAGE RELATED SCRIPTS

	loadDataTableScripts();
	function loadDataTableScripts() {

		loadScript("js/plugin/datatables/jquery.dataTables-cust.min.js", dt_2);

		function dt_2() {
			loadScript("js/plugin/datatables/ColReorder.min.js", dt_3);
		}

		function dt_3() {
			loadScript("js/plugin/datatables/FixedColumns.min.js", dt_4);
		}

		function dt_4() {
			loadScript("js/plugin/datatables/ColVis.min.js", dt_5);
		}

		function dt_5() {
			loadScript("js/plugin/datatables/ZeroClipboard.js", dt_6);
		}

		function dt_6() {
			loadScript("js/plugin/datatables/media/js/TableTools.min.js", dt_7);
		}

		function dt_7() {
			loadScript("js/plugin/datatables/DT_bootstrap.js", runDataTables);
		}

	}

	function runDataTables() {

		/*
		 * BASIC
		 */
		$('#dt_basic').dataTable({
			//"sDom" : "<'dt-top-row'><'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-4'i><'col-sm-8 text-right'p>>",
			//"sDom" : '<"dt-row dt-bottom-row"flipt>',
			"sPaginationType" : "bootstrap_full",
			"bFilter": false,
			"bAutoWidth": false,
			"aaSorting": [[ 3, "desc" ]],	//默认排序列
			"aoColumns": [
				{ "bSortable": false ,"sWidth":"30px"},
				{ "bSortable": false ,"sWidth":"40px"},
				{ "bSortable": false ,"sWidth":"20px"},
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				{ "bSortable": false }
			], 
			//"sScrollX": "110%",
        	//"bScrollCollapse": true,
			//"bPaginate": false, //取消翻页显示
			//"bInfo": false,//页脚信息
			//"bScrollAutoCss": true,
			// "sScrollY": "300px",
			// "bScrollInfinite": true,
			//"bScrollCollapse": true,
			// "iScrollLoadGap": 30,
			//"bPaginate": false,
			//"bRetrieve": true,
			// "iDisplayLength": 5, //每页显示数据量
			//"bLengthChange": false, // 用户不可改变每页显示数量
			"bProcessing": true, // 是否启用进度显示，进度条等等，对处理大量数据很有用处。// 默认值：false
			//"bStateSave": true, // 保存状态到cookie
			"oLanguage": {
			"sZeroRecords": "抱歉， 没有找到",
			"sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
			"sInfoEmpty": "没有数据",
			"sInfoFiltered": "(从 _MAX_ 条数据中检索)",
			"oPaginate": {
			"sFirst": "首页",
			"sPrevious": "前一页",
			"sNext": "后一页",
			"sLast": "尾页"
			},
			"sZeroRecords": "没有检索到数据",
			"sProcessing": "<img src='./loading.gif' />"
			},
 			"fnDrawCallback": function( oSettings ) {
     			$(oSettings.nTable).css('width','100%');
     			$(oSettings.nTable).find("th,td").css('white-space', 'nowrap');
     			 $(oSettings.nTable).find("tr:last td").css({ "border": '1px solid #DDDDDD'});                 
     			$(oSettings.nTable).find('tbody tr.even').css('backgroundColor', '#FFF');
     			$(oSettings.nTable).find(".btn-group").slice(-5).addClass('dropup');
                $(oSettings.nTable).find(".btn-group").slice(0,3).removeClass('dropup');
                $(oSettings.nTable).parent(".dt-wrapper").css({
                    'overflow': 'auto',
                    'min-height': '300px',
                    'background': '#f9f9f9'
                });
                //$(oSettings.nTable).find("th label input,td label input").next("span").css('margin-right', '0');
                // L = $(oSettings.nTable).find("tr").length;
                // if(L < 6){
                //     $(oSettings.nTable).find("tr:last td").css({
                //         "border": '1px solid #DDDDDD'
                //     });                 
                // };
                var chk = $(oSettings.nTable).find(".checkAll");
                chk.click(function(event) {
                    if ($(this).prop('checked')) {
                        $(this).parents("table").find('tbody td input.checkbox').prop('checked', true)
                        $(this).siblings("span").removeClass('someone');
                    } else {
                        $(this).parents("table").find('tbody td input.checkbox').prop('checked', false)
                    };
                });
                $(oSettings.nTable).find("td input.checkbox").click(function(event) {
                    if (!$(this).prop('checked')) {
                        chk.siblings("span").addClass('someone');
                    };
                    checkStateAll = true;
                    checkStateOne = false;
                    $("tbody td input.checkbox").each(function(index, el) {
                        checkStateAll = checkStateAll && $(this).prop('checked');
                        checkStateOne = checkStateOne || $(this).prop('checked');
                    });
                    if (checkStateAll) {
                        checkStateOne = false;                      
                        chk.prop('checked', true)
                        chk.siblings("span").removeClass('someone');                     
                    }
                    if (checkStateOne) {
                        chk.prop('checked', true)
                        chk.siblings("span").addClass('someone');
                    }                   
                    if (checkStateAll === checkStateOne) {
                        chk.prop('checked', false)
                        chk.siblings("span").removeClass('someone');                         
                    }
                });
 			}


		});

		/* END BASIC */

	}

	function dateExport(){
		$('#myModal').modal();
	}

	function selectMoreT(){
		$('#moreTrucks').modal();
	}

	function viewDiv(){
		$('#viewLbs').modal();
		$("#viewLbs .modal-dialog").css("width","800px");
		
	}
	


</script>
